%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/resolvers/basics-object-recursive"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 7, 8, 34, 9<br />2: PgSelect[6]<br />3: PgSelectRows[11]<br />ᐳ: First[10], PgSelectSingle[12]"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 12, 34, 2, 0, 4<br /><br />ROOT PgSelectSingleᐸusersᐳ[12]<br />1: <br />ᐳ: PgClassExpression[13]<br />2: GraphQLResolver[15]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 15, 34, 2, 0, 4<br /><br />ROOT GraphQLResolver{1}ᐸUser.usernameHashesᐳ[15]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 21, 34, 2, 0, 4<br /><br />ROOT GraphQLResolver{2}ᐸHashes.selfᐳ[21]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 23, 34, 2, 0, 4<br /><br />ROOT GraphQLResolver{3}ᐸHashes.selfᐳ[23]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3
    Bucket3 --> Bucket4

    %% plan dependencies
    Object9{{"Object[9∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access7{{"Access[7∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access7 & Access8 --> Object9
    PgSelect6[["PgSelect[6∈0] ➊<br />ᐸrandom_userᐳ"]]:::plan
    Object9 --> PgSelect6
    First10{{"First[10∈0] ➊"}}:::plan
    PgSelectRows11[["PgSelectRows[11∈0] ➊"]]:::plan
    PgSelectRows11 --> First10
    PgSelect6 --> PgSelectRows11
    PgSelectSingle12{{"PgSelectSingle[12∈0] ➊<br />ᐸusersᐳ"}}:::plan
    First10 --> PgSelectSingle12
    __Value0["__Value[0∈0] ➊<br />ᐸvariableValuesᐳ<br />Dependents: 10"]:::plan
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 12"]:::plan
    __Value4["__Value[4∈0] ➊<br />ᐸrootValueᐳ<br />Dependents: 10"]:::plan
    GraphQLResolver15[["GraphQLResolver[15∈1] ➊<br />ᐸUser.usernameHashesᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    PgClassExpression13{{"PgClassExpression[13∈1] ➊<br />ᐸ__random_u...”username”ᐳ"}}:::plan
    PgClassExpression13 --> GraphQLResolver15
    PgSelectSingle12 --> PgClassExpression13
    GraphQLResolver17[["GraphQLResolver[17∈2] ➊<br />ᐸHashes.md5ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver15 --> GraphQLResolver17
    GraphQLResolver19[["GraphQLResolver[19∈2] ➊<br />ᐸHashes.sha256ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver15 --> GraphQLResolver19
    GraphQLResolver21[["GraphQLResolver[21∈2] ➊<br />ᐸHashes.selfᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver15 --> GraphQLResolver21
    GraphQLResolver23[["GraphQLResolver[23∈3] ➊<br />ᐸHashes.selfᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver21 --> GraphQLResolver23
    GraphQLResolver25[["GraphQLResolver[25∈3] ➊<br />ᐸHashes.md5ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver21 --> GraphQLResolver25
    GraphQLResolver27[["GraphQLResolver[27∈3] ➊<br />ᐸHashes.sha256ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver21 --> GraphQLResolver27
    GraphQLResolver29[["GraphQLResolver[29∈3] ➊<br />ᐸHashes.sha256ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver21 --> GraphQLResolver29
    GraphQLResolver31[["GraphQLResolver[31∈4] ➊<br />ᐸHashes.md5ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver23 --> GraphQLResolver31
    GraphQLResolver33[["GraphQLResolver[33∈4] ➊<br />ᐸHashes.sha256ᐳ<br />More deps:<br />- Constantᐸ§{}ᐳ[34]<br />- __Value[2]<br />- __Value[0]<br />- __Value[4]"]]:::unbatchedplan
    GraphQLResolver23 --> GraphQLResolver33

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value0,__Value2,__Value4,PgSelect6,Access7,Access8,Object9,First10,PgSelectRows11,PgSelectSingle12 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgClassExpression13,GraphQLResolver15 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,GraphQLResolver17,GraphQLResolver19,GraphQLResolver21 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,GraphQLResolver23,GraphQLResolver25,GraphQLResolver27,GraphQLResolver29 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,GraphQLResolver31,GraphQLResolver33 bucket4

